<?php
$DEBUGGING = True;
$TRACECOUNT = 0;
 
if($DEBUGGING)
{
    error_reporting(E_ALL);
    ini_set('display_errors', True);
}
 
function trace($message)
{
    global $DEBUGGING;
    global $TRACECOUNT;
    if($DEBUGGING)
    {
        echo '<hr />;'.$TRACECOUNT++.'<code>'.$message.'</code><hr />';
    }
}
 
function tarr($arr)
{
    global $DEBUGGING;
    global $TRACECOUNT;
    if($DEBUGGING)
    {
        echo '<hr />'.$TRACECOUNT++.'<code>';
        print_r($arr);
        echo '</code><hr />';
    }
}
 
?>
<?
session_start(); 
ob_start();

//Lib
include("./kam/admin/class/functions.php");
include("./class/template.php");
//Set Date
date_default_timezone_set('Asia/Saigon');

//Define driectory 
define('CLASS_DIR_AD','./kam/admin/class/');
define('DEFAULT_DIR_AD','./kam/admin/themes/moo/');

global $FullUrl, $Dir_AD;
$FullUrl = '';
$Dir_AD = $FullUrl. DEFAULT_DIR_AD;

global $titles, $descript;
//Ckeditor
include("ckeditor_config.php");
$CKEditor->config['width'] = 600;
$CKEditor->config['height'] = 300;

//Add Lib DB
include("./includes/config.php");
include("./includes/function-new.php");
include ("./includes/va_db.php");
//define do & act & page
$do   = isset($_GET["do"])  ? $_GET["do"] :'account';
$act   = isset($_GET["act"])  ? $_GET["act"]  : "list_account";
$page   = isset($_GET["page"])  ? $_GET["page"]  : '1';//for paging

if(!isset($_GET["do"]))
	$do = "account";
//File exe $do
$file_php = "./kam/admin/modules/".$do."/".$do.".php";
//echo $file_php;
if (!file_exists($file_php)){
	$msg="There is not this function!!!";
	$p='./123.php';

	header($p);
	//page_transfer($msg,$p);
}
else{
	require($file_php);
}

//File view $do
include("./kam/admin/themes/moo/admin-pro.php");
?>
